package com.jlcindia;

public class OOPTest23 {

	public static void main(String[] args) {
		Jlcstud st=new Jlcstud(25,"ravi");
		st.show();
		Jlcstud st2=new Jlcstud(null);
		st2.show();
		System.out.println("Modifying st2 object");
		st2.sid=77;
		st2.name="kumar";
	    st.show();
		st2.show();
		}
}
class Jlcstud{
	int sid;
	String name;
	Jlcstud(int sid, String name) {
		this.sid = sid;
		this.name = name;
	}
	Jlcstud(Jlcstud st) {
		if(st!=null){
		this.sid = st.sid;
		this.name = st.name;
	}else{
		System.out.println("throws some exception");
	}
	}
	void show(){
		//System.out.println("\n Jlcstud INFO");
		System.out.println("\n"+"sid:"+sid+"\t"+"name:"+name);
	}
}
